package com.example.spring;

import com.example.entity.Animal;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@SuppressWarnings("all")
public class SpringDemo04 {
    public static void main(String[] args) {
        ApplicationContext factory = new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("aaa");
        Animal dog = factory.getBean("dog", Animal.class);
        dog.eat();
        System.out.println(dog);
    }
}
